package com.gillion.grule.client.utils;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

public class Collections3 {

    public static <T> List<T> subtract(Collection<T> a, Collection<T> b) {
        List<T> list = new ArrayList(a);
        Iterator<T> iteratorb = b.iterator();

        while(iteratorb.hasNext()) {
            T element = iteratorb.next();
            list.remove(element);
        }
        return list;
    }

}
